#!/bin/bash
ipaddr=`ifconfig|awk '/inet/&&!/inet6/&&!/127.0.0.1/{print $2}'|awk -F ":" '{print $2}'`
echo $ipaddr
tail -F -n +0 query.log|awk -f ./analysis.awk -v ip=$ipaddr
